package com.blueseaapps.data;

import java.io.Serializable;

public class ScoreKeeper implements Serializable{
	
	private int numOfQuestionsAttempted;
	private int numOfQuestionsCorrectlyAnswered;
	
	public static final boolean CORRECT_ANSWER = true;
	public static final boolean INCORRECT_ANSWER = !CORRECT_ANSWER;
	
	
	public ScoreKeeper() {
		numOfQuestionsAttempted = 0;
		numOfQuestionsCorrectlyAnswered = 0;
	}

	public int getNumOfQuestionsAttempted() {
		return numOfQuestionsAttempted;
	}
	
	public int getNumOfQuestionsCorrectlyAnswered() {
		return numOfQuestionsCorrectlyAnswered;
	}
	
	public void questionAnswered(boolean answer){
		numOfQuestionsAttempted++;
		if(answer == CORRECT_ANSWER){
			numOfQuestionsCorrectlyAnswered++;
		}
	}
	
}
